The Database API > Database API functions > MMDB.getViews() |
![]() ![]() ![]() |
Availability
Dreamweaver UltraDev 4.0
Description
Gets a list of all the views defined for the specified database. Each view object has properties: catalog
, schema
, and view
. Catalog
or schema
is used for restricting/filtering the number of views that pertain to an individual schema name or catalog name defined as part of the connection information.
Arguments
connName
connName
is an UltraDev connection name as specified in the Connection Manager. It is used to make a database connection to a live data source.
Returns
An array of view objects; each object has three properties: catalog
, schema
, and view
.
Example
The following example returns the views for a given connection value, CONN_LIST.getValue()
:
var viewObjects = MMDB.getViews(CONN_LIST.getValue()) for (i = 0; i < viewObjects.length; i++) { thisView = viewObjects[i] thisSchema = Trim(thisView.schema) if (thisSchema.length == 0) { thisSchema = Trim(thisView.catalog) } if (thisSchema.length > 0) { thisSchema += "." } views.push(String(thisSchema + thisView.view)) }
![]() ![]() ![]() |